<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.css}">
    <link rel="stylesheet" th:href="@{/css/common.css}">
</head>
<body>
<div th:insert="~{common/header::header2}"></div>
<div class="container-fluid">
    <div class="row">
        <div th:insert="~{common/menu::menu}" class="col-md-2"></div>
        <div class="col-md-10">
            <ul class="breadcrumb">
                <li><a th:href="@{/main.do}">后台主页</a></li>
                <li>防控知识管理</li>
                <li>防控知识更新</li>
            </ul>
            <form th:action="@{/fact-info/update.do}">
                <div>
                    <input type="hidden" name="factId" th:value="${fact.getFactId()}">
                </div>
                <div class="form-group row justify-content-sm-center">
                    <label for="newsTitle" class="col-sm-2 col-form-label font-weight-bold">防控知识标题</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control " id="newsTitle" th:value="${fact.getFactTitle()}" name="newsTitle">
                    </div>
                </div>
                <div class="form-group row justify-content-sm-center">
                    <label class="col-sm-2 col-form-label font-weight-bolder">防控知识类型</label>
                    <div class="col-sm-5">
                        <select class="form-control" name="typeName">
                            <option th:each="typeInfo:${typeInfos}"
                                    th:selected="${fact.getTypeName()==typeInfo.getTypeName()}"
                                    th:value="${typeInfo.getTypeName()}"
                                    th:text="${typeInfo.getTypeName()}">
                            </option>
                        </select>
                    </div>
                </div>
                <div class="form-group row justify-content-sm-center">
                    <label for="factContent" class="col-sm-2 col-form-label font-weight-bold">防控知识内容</label>
                    <div class="col-sm-5">
                        <textarea class="form-control" id="factContent" th:text="${fact.getFactContent()}" name="factContent" rows="3" required> </textarea>
                    </div>
                </div>
                <div class="form-group row justify-content-sm-center">
                    <label for="source" class="col-sm-2 col-form-label font-weight-bold">发布机构</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control" id="source" th:value="${fact.getSource()}" name="source">
                    </div>
                </div>
                <div class="form-group row justify-content-sm-center">
                    <div class="col-sm-1">
                        <button class="btn btn-sm btn-success" type="submit">提交</button>
                    </div>
                    <div class="col-sm-1">
                        <button  class="btn btn-sm btn-primary"><a style="color: white" th:href="@{/fact-info/show.do}" >取消</a></button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
<script th:src="@{/jquery/jquery-3.5.1.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.js}"></script>
<script th:src="@{/bootstrap/datepicker/bootstrap-datepicker.js}"></script>
<script th:src="@{/bootstrap/datepicker/bootstrap-datepicker.zh-CN.min.js}"></script>
</html>